package com.ruoyi.park.mapper;

import com.ruoyi.park.domain.BuiBuilding;
import com.ruoyi.park.domain.vo.BuildingInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 楼栋Mapper接口
 *
 * @author cjie
 * @date 2021-07-20
 */
public interface BuiBuildingMapper {
    /**
     * 查询楼栋
     *
     * @param id 楼栋ID
     * @return 楼栋
     */
     BuiBuilding selectBuiBuildingById(String id);

    /**
     * 查询楼栋
     *
     * @param buildingNum 楼栋编号
     * @return 楼栋
     */
    BuiBuilding selectBuiBuildingByNum(String buildingNum);

    /**
     * 查询楼栋列表
     *
     * @param buiBuilding 楼栋
     * @return 楼栋集合
     */
     List<BuiBuilding> selectBuiBuildingList(BuiBuilding buiBuilding);

    /**
     * 新增楼栋
     *
     * @param buiBuilding 楼栋
     * @return 结果
     */
     int insertBuiBuilding(BuiBuilding buiBuilding);

    /**
     * 修改楼栋
     *
     * @param buiBuilding 楼栋
     * @return 结果
     */
     int updateBuiBuilding(BuiBuilding buiBuilding);

    /**
     * 删除楼栋
     *
     * @param id 楼栋ID
     * @return 结果
     */
     int deleteBuiBuildingById(String id);

    /**
     * 批量删除楼栋
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
     int deleteBuiBuildingByIds(String[] ids);

    /**
     * 查询对应园区的楼栋id,num
     * @param parkId 园区id
     * @return
     */
    List<BuildingInfoVO> selectIdAndNumByParkId(String parkId);

    BuiBuilding selectBuiBuildingByNumAndPark(@Param("parkId")String parkId, @Param("buildingNum")String buildingNum);
}
